/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package objets;

/**
 * 
 * @author phoebus
 */
public class Lubrification {

    private String etats[] = {"OFF", "ON", "HOLL", "MIST"};
    private String instruction[] = new String[4];
    private int position = 0;
    private Boolean modalite =true;

    /**
     * Affecte le code ISO de l arret de lubrification
     *
     * @param moninstruction
     */
    public void setinstructionoff(String moninstruction) {
        this.instruction[0] = moninstruction;
    }

    /**
     * Affecte le code ISO de la mise en marche de la lubrification
     *
     * @param moninstruction
     */
    public void setinstructionon(String moninstruction) {
        this.instruction[1] = moninstruction;
    }

    /**
     * Affecte le code ISO de la lubrification par trou central
     *
     * @param moninstruction
     */
    public void setinstructionholl(String moninstruction) {
        this.instruction[2] = moninstruction;
    }

    /**
     * Affecte le code ISO de la lubrification en brouillard
     *
     * @param moninstruction
     */
    public void setinstructionmist(String moninstruction) {
        this.instruction[3] = moninstruction;
    }

    /**
     * affecte le mode de lubrification OFF, ON, HOLL, MIST
     *
     * @param linstruction
     */
    public void Setinstruction(String linstruction) {
        switch (linstruction) {
            case "OFF":
                this.position = 0;
                break;
            case "ON":
                this.position = 1;
                break;
            case "HOLL":
                this.position = 2;
                break;
            case "MIST":
                this.position = 3;
                break;
            default:

                break;
        }
    }

    /**
     * renvoi l instruction iso en cours
     *
     * @return
     */
    public String getinstruction() {
        return instruction[this.position];
    }

    /**
     * renvoi l'etat de l instruction en cours ON, OFF, HOLL, MIST
     *
     * @return
     */
    public String getinstructionetat() {
        return etats[this.position];
    }

    /**
     * renvoi la liste des etats
     *
     * @return
     */
    public String[] getetatlist() {
        return etats;
    }
}
